package com.ylyq.ylxx.controller;

import com.ylyq.ylxx.model.ResponseData;
import com.ylyq.ylxx.model.bean.GetBalanceRequest;
import com.ylyq.ylxx.model.bean.OceanengineRejectReasonResult;
import com.ylyq.ylxx.model.bean.OceanengineUserInfoByToken;
import com.ylyq.ylxx.model.bean.RefusePlanResponse;
import com.ylyq.ylxx.model.request.ChangeRefusePlanRequest;
import com.ylyq.ylxx.model.request.GetRefusePlanRequest;
import com.ylyq.ylxx.service.IYlyqRefusePlanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaweichao
 * @since 2020-08-21
 */
@RestController
@RequestMapping("/ylyqRefusePlan")
@Api(description = "审核不通过的计划相关接口")
public class YlyqRefusePlanController {

    @Autowired
    private IYlyqRefusePlanService iYlyqRefusePlanService;

    @PostMapping("/getRefusePlan")
    @ApiOperation(value = "获取审核不通过的计划",response = RefusePlanResponse.class)
    public ResponseData getRefusePlan(@RequestBody GetRefusePlanRequest getRefusePlanRequest){
        return iYlyqRefusePlanService.getRefusePlan(getRefusePlanRequest);
    }

    @PostMapping("/changeRefusePlan")
    @ApiOperation(value = "修改重提交审核不通过的计划",response = RefusePlanResponse.class)
    public ResponseData changeRefusePlan(@RequestBody ChangeRefusePlanRequest changeRefusePlanRequest){
        return iYlyqRefusePlanService.changeRefusePlan(changeRefusePlanRequest);
    }
}
